package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.AlertDataHandleDto;
import com.zzyl.entity.AlertData;
import com.zzyl.vo.AlertDataVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface AlertDataMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AlertData record);

    int insertSelective(AlertData record);

    AlertData selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AlertData record);

    int updateByPrimaryKey(AlertData record);

    /**
     * 这是Mybatis Generator拓展插件生成的方法(请勿删除).
     * This method corresponds to the database table alert_data
     *
     * @mbg.generated
     * @author hewei
     */
    int batchInsert(@Param("list") List<AlertData> list);

    Page<AlertDataVo> seletPage(@Param("deviceName") String deviceName, @Param("status") Integer status, @Param("startData") LocalDateTime startData, @Param("endData") LocalDateTime endData);

    void updateStatus(AlertData alertData);


    // void handleAlertData(@Param("id") Long id, @Param("processingResult") String processingResult, @Param("processingTime") LocalDateTime processingTime, @Param("realName") String realName, @Param("id1") Long id1, @Param("iotId") String iotId);

    //void updateStatus(@Param("iotId") String iotId, @Param("userId") Long userId, @Param("realName") String realName, @Param("processingResult") String processingResult, @Param("processingTime") LocalDateTime processingTime);


    // Page<AlertDataVo> adminPageQuery(@Param("id") Long id, @Param("status") Integer status, @Param("deviceName") String deviceName, @Param("id1") Long id1, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    //Page<AlertDataVo> seletPage(@Param("deviceName") String deviceName, @Param("status") Integer status, @Param("startData") LocalDateTime startData, @Param("endData") LocalDateTime endData);

    //Page<AlertDataVo>seletPage(@Param("id") Long id,
                                    // @Param("status") Integer status,
                                     //@Param("deviceName") String deviceName,
                                     //@Param("userId") Long userId


   // );



    // Page<AlertDataVo> seletPage(@Param("id") Long id, @Param("status") Integer status, @Param("deviceName") String deviceName, @Param("id1") Long id1, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);


     //Page<AlertDataVo> seletPage(@Param("deviceName") Long deviceName, @Param("status") Integer status, @Param("startData") String startData, @Param("endData") Long endData);
}